import cv2
import numpy as np

capNo = 0

cap = cv2.VideoCapture(capNo)

cap.open(capNo)
capName = ''
if capNo == 0:
    capName = "Camera@Dell"
else:
    capName = "Camer@Logitech"

while cap.isOpened():
    flag, frame = cap.read()

    cv2.imshow(capName, frame)
    if not flag:
        break

    key_pressed = cv2.waitKey(60)
    print(">>>", key_pressed)
    cv2.moveWindow(capName,0,0)
    if key_pressed == 27:
        break

cap.release()

cv2.destroyAllWindows()
